<template>
    <div>
        <van-grid :column-num="channelArr.length" :border="false">
            <van-grid-item
            v-for="item in channelArr"
            :key="item.id"
            :icon="item.icon_url"
            :text="item.name"
            @click="gotoChannel(item)"
         />    
        </van-grid>
    </div>
</template>

<script>
export default {
    name: "",
    props: ["channelArr"],
    data() {
        return {};
    },
    methods:{
        gotoChannel(item){
            // console.log(item.id);
            //跳转到channel 页面
            this.$router.push({'path':'/Channel',query:{id:item.id}});
        }
    }
};
</script>
<style lang="less" scoped>
/deep/.van-grid-item__icon+.van-grid-item__text {
    margin-top: 12px;
}
</style>